<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2024/4/2
 * Time: 11:42
 */

namespace plugin\admin\app\controller;


use plugin\admin\app\logic\login\LoginLogic;
use Webman\Http\Request;
use Webman\Http\Response;

class LoginController extends CoreController
{
    /**
     * 登录
     * @return \support\Response
     * @throws \Throwable
     */
    public function index()
    {
        return raw_view('login/index');
    }

    /**
     * 登录操作
     * @param Request $request
     * @return Response
     * @throws \plugin\admin\app\exception\AdminException
     */
    public function login(Request $request): Response
    {
        return LoginLogic::getInstance()->login($request);
    }


}